<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
  [
    '<div contenteditable>',
      '<table contenteditable="false"><tbody><tr>',
        '<td contenteditable>foo|bar</td>',
        '<td contenteditable>baz<span contenteditable="false">abc</span>def</td>',
      '</tr></tbody></table>',
      'ghi^jk',
    '</div>'
  ].join(''),
  // 'delete' command adjusted selection to "|ghi^jk" so it will only delete ghi in the end.
  'delete',
  [
    '<div contenteditable>',
      '<table contenteditable="false"><tbody><tr>',
        '<td contenteditable>foobar</td>',
        '<td contenteditable>baz<span contenteditable="false">abc</span>def</td>',
      '</tr></tbody></table>',
      '|jk',
    '</div>'
  ].join('')),
  'Delete selected editable nodes that are not in both the start and end editable roots');
</script>
